package com.zong.bo.service.impl;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.zong.bo.dao.CommonMapper;
import com.zong.bo.service.UserService;
import com.zong.core.bean.DataMap;
import com.zong.core.bean.Result;

@Service(version = "1.0.0")
public class UserServiceImpl implements UserService {
	private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	@Autowired
	private CommonMapper mapper;

	public String say(String msg) {
		return msg + ",666666【" + dateFormat.format(new Date()) + "】";
	}

	@Override
	public List<Result> findUsers() {
		return mapper.find("sys_user", new HashMap<String, String>());
	}

	@Override
	public List<Result> find(String table) {
		List<Result> list = mapper.find(table, new DataMap());
		return list;
	}

}
